package com.chushouya.manager.constants;

import com.general.framework.core.enums.IEnum;

import java.util.Objects;

public enum AlipayAuditStatusEnum implements IEnum<Integer> {
    alipayTodo(-2, "待提交支付宝审核"),
    alipayChecking(0, "支付宝审核中"),
    alipayPassed(1, "支付宝审核通过"),
    alipayReject(-1, "支付宝审核驳回")
    ;

    private Integer value;

    private String desc;


    AlipayAuditStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (AlipayAuditStatusEnum thisEnum : AlipayAuditStatusEnum.values()) {
            if (Objects.equals(thisEnum.value, value)) {
                return thisEnum.desc;
            }
        }
        return "";
    }

    @Override
    public Integer value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }
}
